home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1994 / MacHack 1994.toast / MacHack™ 1987-1994 / MacHack™ '93 / Papers '93 / Macintosh as Internet Server ƒ / inetd / Libraries / MacTCPLib / UDP.h < prev   
Encoding:
C/C++ Source or Header  |  1993-03-16  |  679 b   |  32 lines  |  [TEXT/MPS ]

  1.  
  2. #ifndef __UDPLIB__
  3. #define __UDPLIB__
  4.  
  5. #ifndef __MACTCPCOMMONTYPES__
  6. #include <MacTCPCommonTypes.h>
  7. #endif
  8. #ifndef __UDPPB__
  9. #include <UDPPB.h>
  10. #endif
  11.  
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15.  
  16. #define    WDS(bufCount) struct {                \
  17.     wdsEntry            block[bufCount];    \
  18.     unsigned short        zero;                \
  19. }
  20.  
  21. StreamPtr    udpCreate(int bufSize, udp_port* local, UDPNotifyProc asr, Ptr usrData);
  22. OSErr        udpRead(StreamPtr stream, void* buffer, short* len);
  23. OSErr        udpWrite(StreamPtr stream, void* buffer, short len, ip_addr host, udp_port port);
  24. OSErr        udpWriteWDS(StreamPtr stream, wdsEntry* wds, ip_addr host, udp_port port);
  25. OSErr        udpRelease(StreamPtr stream);
  26.  
  27. #ifdef __cplusplus
  28. }
  29. #endif
  30.  
  31. #endif
  32.